<?php
if (!defined('IN_Deep')) exit('Hacking attempt!');


// 配置信息
$data = [
    'share_title' => '',        // 分享标题
    'share_desc' => '',        // 分享描述
    'share_image' => '',        // 分享图标

    'theme' => 'default',        // 应用默认主题皮肤
    'title' => 'PHPworkCMS',        // 标题
    'logo_url' => 'application/cms/data/image/logo.png',        // 站点logo
    'meta_keywords' => 'meta关键字',        // meta关键字
    'meta_description' => 'meta简介',        // meta简介
    'copyright' => '© PHPwork,All Rights Reserved<br />PHPwork 版权所有',          // 版权信息
    'icp' => 'icp888888',                // icp备案编号
    'hidden_area' => '<!-- 流量统计 -->',        // 隐藏区
];
$data = [
    'type' => 'config',
    'name' => '应用配置',
    'value' => json_encode( $data ),
    'description' => '应用基本配置信息',
    'update_time' => date('Y-m-d H:i:s'),
];
pdo_insert('rj_cms_config',$data);


$sql_install = "

INSERT INTO " . tablename('rj_cms_page') . " VALUES ('1', '0', '单页', '公司简介标题', '简介', '内容', '', '1000020000', '1000020000', 'page_detail.tpl.php', '0', '1', '0');


INSERT INTO " . tablename('rj_cms_article_sort') . " VALUES (1, '0', '0', '0,1,', '新闻动态', '', '简介', '2屏通栏', 'article_list.tpl.php', '0', '1', '0');
INSERT INTO " . tablename('rj_cms_article_sort') . " VALUES (2, '0', '0', '0,2,', '成功案例', '', '简介', '2屏通栏', 'article_list.tpl.php', '0', '1', '0');
INSERT INTO " . tablename('rj_cms_article') . " VALUES (DEFAULT, '0', '1', '文章标题1', '简介', '', '', '', '内容', '', '', '0', '1000020000', '1000020000', '1000020001','article_detail.tpl.php', '0', '1');
INSERT INTO " . tablename('rj_cms_article') . " VALUES (DEFAULT, '0', '1', '文章标题2', '简介', '', '', '', '内容', '', '', '0', '1000020000', '1000020000', '1000020002','article_detail.tpl.php', '0', '1');
INSERT INTO " . tablename('rj_cms_article') . " VALUES (DEFAULT, '0', '2', '文章标题3', '简介', '', '', '', '内容', '', '', '0', '1000020000', '1000020000', '1000020003','article_detail.tpl.php', '0', '1');


INSERT INTO " . tablename('rj_cms_goods_sort') . " VALUES (1, '0', '0', '0,1,', '产品中心', '', '简介', '', 'goods_list.tpl.php', '0', '1', '0');
INSERT INTO " . tablename('rj_cms_goods') . " VALUES (DEFAULT, '0', '1', '产品1', '推荐', 'application/cms/data/image/goods.jpg', '简介', '内容', '0.00','', '0', '1000020000', '1000020000', '1000020001','goods_detail.tpl.php', '0', '1');
INSERT INTO " . tablename('rj_cms_goods') . " VALUES (DEFAULT, '0', '1', '产品2', '推荐', 'application/cms/data/image/goods.jpg', '简介', '内容', '0.00','', '0', '1000020000', '1000020000', '1000020002','goods_detail.tpl.php', '0', '1');


INSERT INTO ".tablename('rj_cms_nav')." (`id`,`uniacid`,`parent_id`,`parent_path`,`name`,`tip`,`nav_img`,`nav_img_focus`,`place`,`url`,`url_target`,`list_order`,`status`,`is_sys`) VALUES 
(1, '0', '0', '0,1,', '首页'    , '简介', '', '', '上部', '" . url( 'cms/index/index' ) . "', '', '0', '1', '0'),
(2, '0', '0', '0,2,', '关于我们', '简介', '', '', '上部', '" . url( 'cms/page/page',['id'=>1]) . "', '', '0', '1', '0'),
(3, '0', '0', '0,3,', '产品中心', '简介', '', '', '上部', '" . url( 'cms/goods/goods_list',['sort_id'=>1]) . "', '', '0', '1', '0'),
(4, '0', '0', '0,4,', '新闻动态', '简介', '', '', '上部', '" . url( 'cms/article/article_list',['sort_id'=>1]) . "', '', '0', '1', '0'),
(5, '0', '0', '0,5,', '成功案例', '简介', '', '', '上部', '" . url( 'cms/article/article_list',['sort_id'=>2]) . "', '', '0', '1', '0');


INSERT INTO ".tablename('rj_cms_slider')." (`id`,`uniacid`,`type`,`name`,`tip`,`url`,`slider_img`,`list_order`,`status`) VALUES 
(DEFAULT, '0', '轮播', '轮播1', '简介', '', 'application/cms/data/image/slider_1.jpg', '0', '1'),
(DEFAULT, '0', '轮播', '轮播2', '简介', '', 'application/cms/data/image/slider_2.jpg', '0', '1');


INSERT INTO " . tablename('rj_cms_friendlink') . " VALUES (DEFAULT, '0', '0', 'PHPwork模块化工作台', 'https://www.kancloud.cn/ruanjie/deep_phpwork/1368810', '简介', 'application/cms/data/image/link_phpwork.png', '0', '1', '0');

";

$GLOBALS['db']->query($sql_install);